﻿namespace EasyWeb.Web.UI
{
    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;
    using System.Threading.Tasks;

    public class EWGridDataBindingBuilder<TModel>
    {
        public EWGridDataBindingBuilder(EWGrid<TModel> grid)
        {
            EWGuard.IsNotNull(grid, "grid");

            this.Component = grid;
        }

        public EWGrid<TModel> Component { get; private set; }

        public EWGridDataBindingBuilder<TModel> RowCount(int rowCount)
        {
            EWGuard.IsNotNegative(rowCount, "rowCount");
            this.Component.RowCount = rowCount;
            return this;
        }
    }
}
